package org.feerepository.client;

import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;

public class FiltersPanel extends Composite 
{
	Grid content = new Grid(2,4);
	
	public FiltersPanel()
	{
		
		content.setWidget(0, 0, new HTML("Format ID"));
		content.setWidget(0, 1, new HTML("Settlement services"));
		content.setWidget(0, 2, new HTML("Message Type Cattegory"));
		content.setWidget(0, 3, new HTML("Product"));
		content.setWidget(1, 0, getFormatId());
		content.setWidget(1, 1, getSettlementServices());
		content.setWidget(1, 2, getMessageTypeCattegory());
		content.setWidget(1, 3, getProduct());
		content.setStyleName("my-style");
		this.initWidget(content);
	}
	
	private VerticalPanel getFormatId()
	{
		VerticalPanel panel =  new VerticalPanel();
		
		CheckBox dualCb = new CheckBox("Dual messages");
		dualCb.setStyleName("my-standard");
		panel.add(dualCb);
		
		CheckBox singleCb = new CheckBox("Single messages");
		singleCb.setStyleName("my-standard");
		panel.add(singleCb);
		
		panel.setStyleName("my-standard");
		panel.setSpacing(3);
		return panel;
	} 
	
	private VerticalPanel getSettlementServices()
	{
		VerticalPanel result  = new VerticalPanel();
		CheckBox issCB = new CheckBox("Iss");
		issCB.setStyleName("my-standard");
		result.add(issCB);
		
		CheckBox eanssCB = new CheckBox("Eanss");
		eanssCB.setStyleName("my-standard");
		result.add(eanssCB);
		
		CheckBox nnssCB = new CheckBox("Nnss");
		nnssCB.setStyleName("my-standard");
		result.add(nnssCB);
		return result;
	}
	
	private VerticalPanel getMessageTypeCattegory()
	{
		VerticalPanel result = new VerticalPanel();
		CheckBox posCB = new CheckBox("Pos");
		posCB.setStyleName("my-standard");
		result.add(posCB);
		
		CheckBox aftCB = new CheckBox("Aft");
		aftCB.setStyleName("my-standard");
		result.add(aftCB);
		
		CheckBox originalCreditCB = new CheckBox("Original Credit");
		originalCreditCB.setStyleName("my-standard");
		result.add(originalCreditCB);
		return result;
	}
	private VerticalPanel getProduct()
	{
		VerticalPanel result = new VerticalPanel();
		CheckBox comercialCB = new CheckBox("Comercial");
		comercialCB.setStyleName("my-standard");
		result.add(comercialCB);
		
		CheckBox businessCB = new CheckBox("Business");
		businessCB.setStyleName("my-standard");
		result.add(businessCB);
		
		CheckBox purchaseCB = new CheckBox("Purchase");
		purchaseCB.setStyleName("my-standard");
		result.add(purchaseCB);
		
		CheckBox corporateCB = new CheckBox("Corporate");
		corporateCB.setStyleName("my-standard");
		result.add(corporateCB);
		return result;
	}

	
}
